<?php include('header.php'); ?>
			<div class="row">
				<div class="span8">
					<div class="flexslider">
						<ul class="slides">
						<?php
				$active_banner	= 'active ';
				foreach($banners as $banner):?>
					<li class="<?php echo $active_banner;?>item">
						<?php
						
						$banner_image	= '<img src="'.base_url('uploads/'.$banner->image).'" />';
						if($banner->link)
						{
							$target=false;
							if($banner->new_window)
							{
								$target=' target="_blank"';
							}
							echo '<a href="'.$banner->link.'"'.$target.'>'.$banner_image.'</a>';
						}
						else
						{
							echo $banner_image;
						}
						?>
					
					</li>
				<?php 
				$active_banner = false;
				endforeach;?>
						</ul>
					</div><!--end flexslider-->
				</div>

				<div class="span4">

					<div id="homeSpecial">
						<div class="titleHeader clearfix">
							<h3>Specialité</h3>
							<div class="pagers">
								<div class="btn-toolbar">
									<div class="btn-group">
										<button class="btn btn-mini vNext"><i class="icon-caret-down"></i></button>
										<button class="btn btn-mini vPrev"><i class="icon-caret-up"></i></button>
									</div>
								</div>
							</div>
						</div><!--end titleHeader-->


						<ul class="vProductItems cycle-slideshow vertical clearfix"
					    data-cycle-fx="carousel"
					    data-cycle-timeout=0
					    data-cycle-slides="> li"
					    data-cycle-next=".vPrev"
					    data-cycle-prev=".vNext"
					    data-cycle-carousel-visible="2"
					    data-cycle-carousel-vertical="true"
					    >
					    
						<?php foreach ($special as $product):
						$base_url=$product->category_slug;
						?>
							<li class="span4 clearfix">
								<div class="thumbImage">
									<a href="<?php echo site_url(implode('/', $base_url).'/'.$product->slug); ?>">
										<img src="<?php echo base_url('images/mini/'.$product->images)?>" alt="<?php echo $product->seo_title?>" style="max-width: 92px; max-height: 92px"/>
									</a>
								</div>
								<div class="thumbSetting">
									<div class="thumbTitle">
										<a href="<?php echo site_url(implode('/', $base_url).'/'.$product->slug); ?>" class="invarseColor">
											<?php echo $product->name?>
										</a>
									</div>
									<div class="thumbPrice">
										<span>
											<span class="strike-through"><?php echo $product->price>0?format_currency($product->price):''?></span> 
											<?php echo format_currency($product->saleprice)?>
										</span>
									</div>
									
										<a href="<?php echo implode('/',$product->category_slug)?>" class="invarseColor">
											<?php echo $product->category_name?>
										</a>
										
								</div>
							</li>
							<?php endforeach;?>
						</ul>
					</div><!--end homeSpecial-->

				</div><!--end span4-->
				
			</div>
<div class="row">
	<?php foreach($boxes as $box):?>
	<div class="span3">
		<?php
		
		$box_image	= '<img class="responsiveImage" src="'.base_url('uploads/'.$box->image).'" />';
		if($box->link != '')
		{
			$target	= false;
			if($box->new_window)
			{
				$target = 'target="_blank"';
			}
			echo '<a href="'.$box->link.'" '.$target.' >'.$box_image.'</a>';
		}
		else
		{
			echo $box_image;
		}
		?>
	</div>
	<?php endforeach;?>
</div>


<?php

foreach ($featured as $featured_Category):
$base_url=$featured_Category['category_slug'];
?>
			<div class="row">

				<div class="span12">
					<div id="featuredItems">
						<!-- <div class="span12"> -->
						<div class="titleHeader clearfix">
							<h3><?php echo $featured_Category['category_name']?></h3>
						</div><!--end titleHeader-->
						<!-- </div> -->
						

						<div class="row">
							<ul class="hProductItems clearfix">
						<?php 
						if(isset($featured_Category['products']) and !empty($featured_Category['products']))
						foreach ($featured_Category['products'] as $product){

							if(is_object($product)):
						?>
								<li class="span3 clearfix">
									<div class="thumbnail">
										<a href="<?php echo site_url(implode('/', $base_url).'/'.$product->slug); ?>">
											<img src="<?php echo base_url('images/thumbnails/'.$product->primary_photo)?>" alt="<?php echo $product->seo_title?>">
										</a>
									</div>
									<div class="thumbSetting">
										<div class="thumbTitle">
											<a href="<?php echo site_url(implode('/', $base_url).'/'.$product->slug); ?>" class="invarseColor">
												<?php echo $product->name?>
											</a>
										</div>
										<div class="thumbPrice">
											<span>
												<span class="strike-through"><?php echo $product->price>0?format_currency($product->price):''?></span> 
												<?php echo format_currency($product->saleprice)?>
											</span>
										</div>

										<div class="thumbButtons">
											<button class="btn btn-primary btn-small" data-title="+To Cart" data-placement="top" rel="tooltip">
												<i class="icon-shopping-cart"></i>
											</button>
										</div>

										<ul class="rating">
											<li><i class="star-on"></i></li>
											<li><i class="star-on"></i></li>
											<li><i class="star-on"></i></li>
											<li><i class="star-on"></i></li>
											<li><i class="star-off"></i></li>
										</ul>
									</div>
								</li>
								
						<?php endif; 
							} ?>
						
							</ul>
						</div><!--end row-->
						
					</div><!--end featuredItems-->
				</div><!--end span12-->

			</div><!--end row-->

	<?php endforeach;?>

<?php include('footer.php'); ?>